home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL / glgetlight.z / glgetlight
Encoding:
Text File  |  2002-10-03  |  13.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ggggllllGGGGeeeettttLLLLiiiigggghhhhtttt((((3333GGGG))))                 OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                 ggggllllGGGGeeeettttLLLLiiiigggghhhhtttt((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllGGGGeeeettttLLLLiiiigggghhhhttttffffvvvv,,,, ggggllllGGGGeeeettttLLLLiiiigggghhhhttttiiiivvvv - return light source parameter values
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void ggggllllGGGGeeeettttLLLLiiiigggghhhhttttffffvvvv( GLenum _l_i_g_h_t,
  14.                         GLenum _p_n_a_m_e,
  15.                         GLfloat *_p_a_r_a_m_s )
  16.      void ggggllllGGGGeeeettttLLLLiiiigggghhhhttttiiiivvvv( GLenum _l_i_g_h_t,
  17.                         GLenum _p_n_a_m_e,
  18.                         GLint *_p_a_r_a_m_s )
  19.  
  20.  
  21. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  22.      _l_i_g_h_t   Specifies a light source.  The number of possible lights depends
  23.              on the implementation, but at least eight lights are supported.
  24.              They are identified by symbolic names of the form GGGGLLLL____LLLLIIIIGGGGHHHHTTTTi where
  25.              0 _< i < GGGGLLLL____MMMMAAAAXXXX____LLLLIIIIGGGGHHHHTTTTSSSS.
  26.  
  27.      _p_n_a_m_e   Specifies a light source parameter for _l_i_g_h_t.  Accepted symbolic
  28.              names are GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT, GGGGLLLL____DDDDIIIIFFFFFFFFUUUUSSSSEEEE, GGGGLLLL____SSSSPPPPEEEECCCCUUUULLLLAAAARRRR, GGGGLLLL____PPPPOOOOSSSSIIIITTTTIIIIOOOONNNN,
  29.              GGGGLLLL____SSSSPPPPOOOOTTTT____DDDDIIIIRRRREEEECCCCTTTTIIIIOOOONNNN, GGGGLLLL____SSSSPPPPOOOOTTTT____EEEEXXXXPPPPOOOONNNNEEEENNNNTTTT, GGGGLLLL____SSSSPPPPOOOOTTTT____CCCCUUUUTTTTOOOOFFFFFFFF,
  30.              GGGGLLLL____CCCCOOOONNNNSSSSTTTTAAAANNNNTTTT____AAAATTTTTTTTEEEENNNNUUUUAAAATTTTIIIIOOOONNNN, GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____AAAATTTTTTTTEEEENNNNUUUUAAAATTTTIIIIOOOONNNN, and
  31.              GGGGLLLL____QQQQUUUUAAAADDDDRRRRAAAATTTTIIIICCCC____AAAATTTTTTTTEEEENNNNUUUUAAAATTTTIIIIOOOONNNN.
  32.  
  33.      _p_a_r_a_m_s  Returns the requested data.
  34.  
  35. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  36.      ggggllllGGGGeeeettttLLLLiiiigggghhhhtttt returns in _p_a_r_a_m_s the value or values of a light source
  37.      parameter.  _l_i_g_h_t names the light and is a symbolic name of the form
  38.      GGGGLLLL____LLLLIIIIGGGGHHHHTTTTi for 0 _< i < GGGGLLLL____MMMMAAAAXXXX____LLLLIIIIGGGGHHHHTTTTSSSS, where GGGGLLLL____MMMMAAAAXXXX____LLLLIIIIGGGGHHHHTTTTSSSS is an
  39.      implementation dependent constant that is greater than or equal to eight.
  40.      _p_n_a_m_e specifies one of ten light source parameters, again by symbolic
  41.      name.
  42.  
  43.      The following parameters are defined:
  44.  
  45.      GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT          _p_a_r_a_m_s returns four integer or floating-point values
  46.                          representing the ambient intensity of the light
  47.                          source.  Integer values, when requested, are linearly
  48.                          mapped from the internal floating-point
  49.                          representation such that 1.0 maps to the most
  50.                          positive representable integer value, and -1.0 maps
  51.                          to the most negative representable integer value.  If
  52.                          the internal value is outside the range [-1, 1], the
  53.                          corresponding integer return value is undefined. The
  54.                          initial value is (0, 0, 0, 1).
  55.  
  56.      GGGGLLLL____DDDDIIIIFFFFFFFFUUUUSSSSEEEE          _p_a_r_a_m_s returns four integer or floating-point values
  57.                          representing the diffuse intensity of the light
  58.                          source.  Integer values, when requested, are linearly
  59.                          mapped from the internal floating-point
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggllllGGGGeeeettttLLLLiiiigggghhhhtttt((((3333GGGG))))                 OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                 ggggllllGGGGeeeettttLLLLiiiigggghhhhtttt((((3333GGGG))))
  71.  
  72.  
  73.  
  74.                          representation such that 1.0 maps to the most
  75.                          positive representable integer value, and -1.0 maps
  76.                          to the most negative representable integer value.  If
  77.                          the internal value is outside the range [-1, 1], the
  78.                          corresponding integer return value is undefined. The
  79.                          initial value for GGGGLLLL____LLLLIIIIGGGGHHHHTTTT0000 is (1, 1, 1, 1); for
  80.                          other lights, the initial value is (0, 0, 0, 0).
  81.  
  82.      GGGGLLLL____SSSSPPPPEEEECCCCUUUULLLLAAAARRRR         _p_a_r_a_m_s returns four integer or floating-point values
  83.                          representing the specular intensity of the light
  84.                          source.  Integer values, when requested, are linearly
  85.                          mapped from the internal floating-point
  86.                          representation such that 1.0 maps to the most
  87.                          positive representable integer value, and -1.0 maps
  88.                          to the most negative representable integer value.  If
  89.                          the internal value is outside the range [-1, 1], the
  90.                          corresponding integer return value is undefined. The
  91.                          initial value for GGGGLLLL____LLLLIIIIGGGGHHHHTTTT0000 is (1, 1, 1, 1); for
  92.                          other lights, the initial value is (0, 0, 0, 0).
  93.  
  94.      GGGGLLLL____PPPPOOOOSSSSIIIITTTTIIIIOOOONNNN         _p_a_r_a_m_s returns four integer or floating-point values
  95.                          representing the position of the light source.
  96.                          Integer values, when requested, are computed by
  97.                          rounding the internal floating-point values to the
  98.                          nearest integer value.  The returned values are those
  99.                          maintained in eye coordinates.  They will not be
  100.                          equal to the values specified using ggggllllLLLLiiiigggghhhhtttt, unless
  101.                          the modelview matrix was identity at the time ggggllllLLLLiiiigggghhhhtttt
  102.                          was called. The initial value is (0, 0, 1, 0).
  103.  
  104.      GGGGLLLL____SSSSPPPPOOOOTTTT____DDDDIIIIRRRREEEECCCCTTTTIIIIOOOONNNN   _p_a_r_a_m_s returns three integer or floating-point values
  105.                          representing the direction of the light source.
  106.                          Integer values, when requested, are computed by
  107.                          rounding the internal floating-point values to the
  108.                          nearest integer value.  The returned values are those
  109.                          maintained in eye coordinates.  They will not be
  110.                          equal to the values specified using ggggllllLLLLiiiigggghhhhtttt, unless
  111.                          the modelview matrix was identity at the time ggggllllLLLLiiiigggghhhhtttt
  112.                          was called.  Although spot direction is normalized
  113.                          before being used in the lighting equation, the
  114.                          returned values are the transformed versions of the
  115.                          specified values prior to normalization. The initial
  116.                          value is (0, 0, -1).
  117.  
  118.      GGGGLLLL____SSSSPPPPOOOOTTTT____EEEEXXXXPPPPOOOONNNNEEEENNNNTTTT    _p_a_r_a_m_s returns a single integer or floating-point
  119.                          value representing the spot exponent of the light.
  120.                          An integer value, when requested, is computed by
  121.                          rounding the internal floating-point representation
  122.                          to the nearest integer. The initial value is 0.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ggggllllGGGGeeeettttLLLLiiiigggghhhhtttt((((3333GGGG))))                 OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                 ggggllllGGGGeeeettttLLLLiiiigggghhhhtttt((((3333GGGG))))
  137.  
  138.  
  139.  
  140.      GGGGLLLL____SSSSPPPPOOOOTTTT____CCCCUUUUTTTTOOOOFFFFFFFF      _p_a_r_a_m_s returns a single integer or floating-point
  141.                          value representing the spot cutoff angle of the
  142.                          light.  An integer value, when requested, is computed
  143.                          by rounding the internal floating-point
  144.                          representation to the nearest integer. The initial
  145.                          value is 180.
  146.  
  147.      GGGGLLLL____CCCCOOOONNNNSSSSTTTTAAAANNNNTTTT____AAAATTTTTTTTEEEENNNNUUUUAAAATTTTIIIIOOOONNNN
  148.                          _p_a_r_a_m_s returns a single integer or floating-point
  149.                          value representing the constant (not distance-
  150.                          related) attenuation of the light.  An integer value,
  151.                          when requested, is computed by rounding the internal
  152.                          floating-point representation to the nearest integer.
  153.                          The initial value is 1.
  154.  
  155.      GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____AAAATTTTTTTTEEEENNNNUUUUAAAATTTTIIIIOOOONNNN
  156.                          _p_a_r_a_m_s returns a single integer or floating-point
  157.                          value representing the linear attenuation of the
  158.                          light.  An integer value, when requested, is computed
  159.                          by rounding the internal floating-point
  160.                          representation to the nearest integer. The initial
  161.                          value is 0.
  162.  
  163.      GGGGLLLL____QQQQUUUUAAAADDDDRRRRAAAATTTTIIIICCCC____AAAATTTTTTTTEEEENNNNUUUUAAAATTTTIIIIOOOONNNN
  164.                          _p_a_r_a_m_s returns a single integer or floating-point
  165.                          value representing the quadratic attenuation of the
  166.                          light.  An integer value, when requested, is computed
  167.                          by rounding the internal floating-point
  168.                          representation to the nearest integer. The initial
  169.                          value is 0.
  170.  
  171. NNNNOOOOTTTTEEEESSSS
  172.      It is always the case that GGGGLLLL____LLLLIIIIGGGGHHHHTTTTi = GGGGLLLL____LLLLIIIIGGGGHHHHTTTT0000 + i.
  173.  
  174.      If an error is generated, no change is made to the contents of _p_a_r_a_m_s.
  175.  
  176. EEEERRRRRRRROOOORRRRSSSS
  177.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _l_i_g_h_t or _p_n_a_m_e is not an accepted value.
  178.  
  179.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllGGGGeeeettttLLLLiiiigggghhhhtttt is executed between the
  180.      execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd.
  181.  
  182.  
  183. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  184.      ggggllllLLLLiiiigggghhhhtttt
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.